package com.hspedu.collection_;

import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@SuppressWarnings({"all"})
public class LinkedList01 {
    public static void main(String[] args) {
        LinkedList linkedList = new LinkedList();
        linkedList.add("hello");
        linkedList.add("nihao");
        linkedList.remove(0);
        Iterator iterator = linkedList.iterator();
        while (iterator.hasNext()) {
            Object next = iterator.next();
            System.out.println(next);
        }
    }
}

class Node{
    public Object item;
    public Node next;
    public Node pre;

    public Node(Object item) {
        this.item = item;
    }

    @Override
    public String toString() {
        return "Node name " + item;
    }
}
